﻿using CTP.CRM.Core.SqlSugar.Entitys;
using CTP.CRM.Repository.Enum;
using SqlSugar;

namespace CTP.CRM.Repository.VSystemRepository.Entitys
{
    /// <summary>
    /// 
    /// </summary>
    [SugarTable("v_system")]
    public class VSystemEntity : IFullAuditedBasicEntitys
    {
        /// <summary>
        /// 子系统id
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 关联的内部子系统
        /// </summary>
        [SugarColumn(ColumnName = "AssociatedInternalSubsystem")]
        public int? AssociatedInternalSubsystem { get; set; }

        /// <summary>
        /// 中文名
        /// </summary>
        [SugarColumn(ColumnName = "CnName")]
        public string CnName { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnName = "Comment")]
        public string Comment { get; set; }

        /// <summary>
        /// 安装包下载链接，当类型为安装包时，必填
        /// </summary>
        [SugarColumn(ColumnName = "DownloadUrl")]
        public string DownloadUrl { get; set; }

        /// <summary>
        /// 英文名
        /// </summary>
        [SugarColumn(ColumnName = "EnName")]
        public string EnName { get; set; }

        /// <summary>
        /// 飞书应用ID
        /// </summary>
        [SugarColumn(ColumnName = "FsAppId")]
        public string FsAppId { get; set; }

        /// <summary>
        /// 是否开通授信
        /// </summary>
        [SugarColumn(ColumnName = "IsCredit")]
        public bool? IsCredit { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        [SugarColumn(ColumnName = "IsEnable")]
        public bool IsEnable { get; set; }

        /// <summary>
        /// 是否启用业务主体(判断登录是否选择业务主体）
        /// </summary>
        [SugarColumn(ColumnName = "IsEnableBusiness")]
        public bool? IsEnableBusiness { get; set; }

        /// <summary>
        /// 是否开通余额
        /// </summary>
        [SugarColumn(ColumnName = "IsOpenBalance")]
        public bool IsOpenBalance { get; set; }

        /// <summary>
        /// 子系统唯一值
        /// </summary>
        [SugarColumn(ColumnName = "Key")]
        public string Key { get; set; }

        /// <summary>
        /// 子系统Logo图标
        /// </summary>
        [SugarColumn(ColumnName = "LogoIcon")]
        public string LogoIcon { get; set; }

        /// <summary>
        /// 主账号Id
        /// </summary>
        [SugarColumn(ColumnName = "MainUserId")]
        public int? MainUserId { get; set; }

        /// <summary>
        /// 移动端链接
        /// </summary>
        [SugarColumn(ColumnName = "MobileUrl")]
        public string MobileUrl { get; set; }

        /// <summary>
        /// 运营主体
        /// </summary>
        [SugarColumn(ColumnName = "OperatingSubject")]
        public int? OperatingSubject { get; set; }

        /// <summary>
        /// 排序值
        /// </summary>
        [SugarColumn(ColumnName = "Sort")]
        public int? Sort { get; set; }

        /// <summary>
        /// 跨境电商物流1;干线物流2;国内代理贸易3;非业务类4
        /// </summary>
        [SugarColumn(ColumnName = "SysBusinessType")]
        public VSysBusinessTypeEnum? SysBusinessType { get; set; }

        /// <summary>
        /// 系统所属1:内部 2:外部
        /// </summary>
        [SugarColumn(ColumnName = "SystemProperty")]
        public int SystemProperty { get; set; }

        /// <summary>
        /// 子系统类型：1-Web、2-安装包exe
        /// </summary>
        [SugarColumn(ColumnName = "SystemType")]
        public int? SystemType { get; set; }

        /// <summary>
        /// 子系统token
        /// </summary>
        [SugarColumn(ColumnName = "Token")]
        public string Token { get; set; }

    }
}